﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WF_Loadout_Editor
{
    public enum ObjectType
    {
        Warframe = 0,
        Rifle,
        Shotgun,
        Pistol,
        Melee,
        Sentinel
    }

    public class BaseObject
    {
        private ObjectType type;
        public ObjectType Type
        {
            get { return type; }
            set { type = value; }
        }

        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private int level;
        public int Level
        {
            get { return level; }
            set { level = value; }
        }

        private bool isSuperCharged;
        public bool IsSuperCharged
        {
            get { return isSuperCharged; }
            set { isSuperCharged = value; }
        }

        private int maxModPoints;
        public int MaxModPoints
        {
            get { return maxModPoints; }
            set { maxModPoints = value; }
        }

        private int currentModPoints;
        public int CurrentModPoints
        {
            get { return currentModPoints; }
            set { currentModPoints = value; }
        }

        private List<Polarity> polarities;
        public List<Polarity> Polarities
        {
            get { return polarities; }
            set { polarities = value; }
        }

        private List<BaseMod> mods;
        public List<BaseMod> Mods
        {
            get { return mods; }
            set { mods = value; }
        }

        public BaseObject()
        {
        }

        public BaseObject(string name1, int level1, bool isSuperCharged1, List<Polarity> polarities1, ObjectType type1)
        {
            type = type1;
            name = name1;
            level = level1;
            isSuperCharged = isSuperCharged1;
            if (isSuperCharged)
            {
                maxModPoints += level;
                currentModPoints = maxModPoints;
            }
            else
                maxModPoints = currentModPoints = level;

            polarities = new List<Polarity>(polarities1);

            mods = new List<BaseMod>();
            Polarity tempPol = new Polarity(5,-1);
            BaseMod tempMod = new BaseMod("Default", "Default",ModType.None, tempPol, 0.0f, 0.0f, 0, 0, 0);
            for (int i = 0; i < 8; ++i)
                mods.Add(tempMod);
        }

        public void UpdateLevel()
        {

        }


    }
}
